package semantic_compute.common.yago_schema;

/**
 * Created by julianzliu on 4/21/2017.
 */
public class LuceneItem {

    public String rid;
    public Float lucene_score;
    public Integer label_leghth;


    public LuceneItem(String rid,Float lucene_score, Integer label_leghth){
        this.label_leghth= label_leghth;
        this.lucene_score = lucene_score;
        this.rid = rid;
    }

    public Float getNormalizeScore(){
        Float score = lucene_score;
        if(this.label_leghth > 1){
            score = this.lucene_score / new Float( Math.log(  this.label_leghth) );
        }
        return score;
    }
}
